package svc

import (
	"doctor/api/internal/config"
	"doctor/doctorrpc/doctorrpcclient"
	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config    config.Config
	Doctorrpc doctorrpcclient.Doctorrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:    c,
		Doctorrpc: doctorrpcclient.NewDoctorrpc(zrpc.MustNewClient(c.Doctorrpc)),
	}
}
